package com.pureut.equipment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pureut.equipment.domain.PatrolWorkOrder;
import com.pureut.equipment.domain.dto.PatrolWorkOrderDto;
import com.pureut.equipment.domain.vo.AuditVo;
import com.pureut.equipment.domain.vo.PatrolWorkOrderVo;

import java.util.List;

/***
 *
 * Author:巡检工单service
 * Date:2023/04/26 13:44
 * @DESC
 */
public interface PatrolWorkOrderService extends IService<PatrolWorkOrder> {

    /**
     * 巡检工单列表
     */
    List<PatrolWorkOrderDto> getList(PatrolWorkOrderVo patrolWorkOrderVo);

    /**
     * 新增
     */
    boolean add(PatrolWorkOrderVo patrolWorkOrderVo) throws Exception;

    /**
     * 新增(定时任务调用)
     */
    boolean addScheduling(PatrolWorkOrderVo patrolWorkOrderVo) throws Exception;

    /**
     * 巡检工单新增(当日触发调用)
     * @param patrolWorkOrderVo
     * @return
     * @throws Exception
     */
    boolean addToday(PatrolWorkOrderVo patrolWorkOrderVo) throws Exception;

    /**
     * 派工
     */
    boolean dispatch(PatrolWorkOrderVo patrolWorkOrderVo);

    /**
     * 执行巡检
     */
    boolean execute(PatrolWorkOrderVo patrolWorkOrderVo);

    /**
     * 提交审核
     */
    boolean audit(Long id);

    /**
     * 撤销审核
     */
    boolean revocation(Long id);

    /**
     * 单据审核
     */
    boolean documentAudit(AuditVo auditVo);

    /**
     * 修改
     */
    boolean updatePatrolWorkOrder(PatrolWorkOrderVo patrolWorkOrderVo);

    /**
     * 查看
     */
    PatrolWorkOrderDto getView(Long id);

    /**
     * 删除
     */
    boolean deleteWorkOrder(Long id);
}
